3.233 \(\int (f+g x) (A+B \log (\frac {e (a+b x)}{c+d x})) \, dx\)

Optimal. Leaf size=109 \[ \frac {(f+g x)^2 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{2 g}-\frac {B (b f-a g)^2 \log (a+b x)}{2 b^2 g}-\frac {B g x (b c-a d)}{2 b d}+\frac {B (d f-c g)^2 \log (c+d x)}{2 d^2 g} \]

[Out]

-1/2*B*(-a*d+b*c)*g*x/b/d-1/2*B*(-a*g+b*f)^2*ln(b*x+a)/b^2/g+1/2*(g*x+f)^2*(A+B*ln(e*(b*x+a)/(d*x+c)))/g+1/2*B
*(-c*g+d*f)^2*ln(d*x+c)/d^2/g

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2525, 12, 72} \[ \frac {(f+g x)^2 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{2 g}-\frac {B (b f-a g)^2 \log (a+b x)}{2 b^2 g}-\frac {B g x (b c-a d)}{2 b d}+\frac {B (d f-c g)^2 \log (c+d x)}{2 d^2 g} \]

Antiderivative was successfully verified.

[In]

Int[(f + g*x)*(A + B*Log[(e*(a + b*x))/(c + d*x)]),x]

[Out]

-(B*(b*c - a*d)*g*x)/(2*b*d) - (B*(b*f - a*g)^2*Log[a + b*x])/(2*b^2*g) + ((f + g*x)^2*(A + B*Log[(e*(a + b*x)
)/(c + d*x)]))/(2*g) + (B*(d*f - c*g)^2*Log[c + d*x])/(2*d^2*g)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 2525

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Simp[((d + e*x)^(m
+ 1)*(a + b*Log[c*RFx^p])^n)/(e*(m + 1)), x] - Dist[(b*n*p)/(e*(m + 1)), Int[SimplifyIntegrand[((d + e*x)^(m +
 1)*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && RationalFunc
tionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || IntegerQ[m]) && NeQ[m, -1]

Rubi steps

\begin {align*} \int (f+g x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx &=\frac {(f+g x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{2 g}-\frac {B \int \frac {(b c-a d) (f+g x)^2}{(a+b x) (c+d x)} \, dx}{2 g}\\ &=\frac {(f+g x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{2 g}-\frac {(B (b c-a d)) \int \frac {(f+g x)^2}{(a+b x) (c+d x)} \, dx}{2 g}\\ &=\frac {(f+g x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{2 g}-\frac {(B (b c-a d)) \int \left (\frac {g^2}{b d}+\frac {(b f-a g)^2}{b (b c-a d) (a+b x)}+\frac {(d f-c g)^2}{d (-b c+a d) (c+d x)}\right ) \, dx}{2 g}\\ &=-\frac {B (b c-a d) g x}{2 b d}-\frac {B (b f-a g)^2 \log (a+b x)}{2 b^2 g}+\frac {(f+g x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{2 g}+\frac {B (d f-c g)^2 \log (c+d x)}{2 d^2 g}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 114, normalized size = 1.05 \[ \frac {b \left (d \left (B g^2 x (a d-b c)+A b d (f+g x)^2\right )+b B d^2 (f+g x)^2 \log \left (\frac {e (a+b x)}{c+d x}\right )+b B (d f-c g)^2 \log (c+d x)\right )-B d^2 (b f-a g)^2 \log (a+b x)}{2 b^2 d^2 g} \]

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x)*(A + B*Log[(e*(a + b*x))/(c + d*x)]),x]

[Out]

(-(B*d^2*(b*f - a*g)^2*Log[a + b*x]) + b*(d*(B*(-(b*c) + a*d)*g^2*x + A*b*d*(f + g*x)^2) + b*B*d^2*(f + g*x)^2
*Log[(e*(a + b*x))/(c + d*x)] + b*B*(d*f - c*g)^2*Log[c + d*x]))/(2*b^2*d^2*g)

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 150, normalized size = 1.38 \[ \frac {A b^{2} d^{2} g x^{2} + {\left (2 \, A b^{2} d^{2} f - {\left (B b^{2} c d - B a b d^{2}\right )} g\right )} x + {\left (2 \, B a b d^{2} f - B a^{2} d^{2} g\right )} \log \left (b x + a\right ) - {\left (2 \, B b^{2} c d f - B b^{2} c^{2} g\right )} \log \left (d x + c\right ) + {\left (B b^{2} d^{2} g x^{2} + 2 \, B b^{2} d^{2} f x\right )} \log \left (\frac {b e x + a e}{d x + c}\right )}{2 \, b^{2} d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(A+B*log(e*(b*x+a)/(d*x+c))),x, algorithm="fricas")

[Out]

1/2*(A*b^2*d^2*g*x^2 + (2*A*b^2*d^2*f - (B*b^2*c*d - B*a*b*d^2)*g)*x + (2*B*a*b*d^2*f - B*a^2*d^2*g)*log(b*x +
 a) - (2*B*b^2*c*d*f - B*b^2*c^2*g)*log(d*x + c) + (B*b^2*d^2*g*x^2 + 2*B*b^2*d^2*f*x)*log((b*e*x + a*e)/(d*x
+ c)))/(b^2*d^2)

________________________________________________________________________________________

giac [B]  time = 1.06, size = 2355, normalized size = 21.61 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(A+B*log(e*(b*x+a)/(d*x+c))),x, algorithm="giac")

[Out]

1/2*(2*B*b^5*c^2*d*f*e^3*log(-b*e + (b*x*e + a*e)*d/(d*x + c)) - 4*B*a*b^4*c*d^2*f*e^3*log(-b*e + (b*x*e + a*e
)*d/(d*x + c)) + 2*B*a^2*b^3*d^3*f*e^3*log(-b*e + (b*x*e + a*e)*d/(d*x + c)) - B*b^5*c^3*g*e^3*log(-b*e + (b*x
*e + a*e)*d/(d*x + c)) + B*a*b^4*c^2*d*g*e^3*log(-b*e + (b*x*e + a*e)*d/(d*x + c)) + B*a^2*b^3*c*d^2*g*e^3*log
(-b*e + (b*x*e + a*e)*d/(d*x + c)) - B*a^3*b^2*d^3*g*e^3*log(-b*e + (b*x*e + a*e)*d/(d*x + c)) - 4*(b*x*e + a*
e)*B*b^4*c^2*d^2*f*e^2*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c) + 8*(b*x*e + a*e)*B*a*b^3*c*d^3*f*e^2*l
og(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c) - 4*(b*x*e + a*e)*B*a^2*b^2*d^4*f*e^2*log(-b*e + (b*x*e + a*e)*
d/(d*x + c))/(d*x + c) + 2*(b*x*e + a*e)*B*b^4*c^3*d*g*e^2*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c) - 2
*(b*x*e + a*e)*B*a*b^3*c^2*d^2*g*e^2*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c) - 2*(b*x*e + a*e)*B*a^2*b
^2*c*d^3*g*e^2*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c) + 2*(b*x*e + a*e)*B*a^3*b*d^4*g*e^2*log(-b*e +
(b*x*e + a*e)*d/(d*x + c))/(d*x + c) + 2*(b*x*e + a*e)^2*B*b^3*c^2*d^3*f*e*log(-b*e + (b*x*e + a*e)*d/(d*x + c
))/(d*x + c)^2 - 4*(b*x*e + a*e)^2*B*a*b^2*c*d^4*f*e*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c)^2 + 2*(b*
x*e + a*e)^2*B*a^2*b*d^5*f*e*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c)^2 - (b*x*e + a*e)^2*B*b^3*c^3*d^2
*g*e*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c)^2 + (b*x*e + a*e)^2*B*a*b^2*c^2*d^3*g*e*log(-b*e + (b*x*e
 + a*e)*d/(d*x + c))/(d*x + c)^2 + (b*x*e + a*e)^2*B*a^2*b*c*d^4*g*e*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*
x + c)^2 - (b*x*e + a*e)^2*B*a^3*d^5*g*e*log(-b*e + (b*x*e + a*e)*d/(d*x + c))/(d*x + c)^2 + 2*(b*x*e + a*e)*B
*b^4*c^2*d^2*f*e^2*log((b*x*e + a*e)/(d*x + c))/(d*x + c) - 4*(b*x*e + a*e)*B*a*b^3*c*d^3*f*e^2*log((b*x*e + a
*e)/(d*x + c))/(d*x + c) + 2*(b*x*e + a*e)*B*a^2*b^2*d^4*f*e^2*log((b*x*e + a*e)/(d*x + c))/(d*x + c) - 2*(b*x
*e + a*e)*B*a*b^3*c^2*d^2*g*e^2*log((b*x*e + a*e)/(d*x + c))/(d*x + c) + 4*(b*x*e + a*e)*B*a^2*b^2*c*d^3*g*e^2
*log((b*x*e + a*e)/(d*x + c))/(d*x + c) - 2*(b*x*e + a*e)*B*a^3*b*d^4*g*e^2*log((b*x*e + a*e)/(d*x + c))/(d*x
+ c) - 2*(b*x*e + a*e)^2*B*b^3*c^2*d^3*f*e*log((b*x*e + a*e)/(d*x + c))/(d*x + c)^2 + 4*(b*x*e + a*e)^2*B*a*b^
2*c*d^4*f*e*log((b*x*e + a*e)/(d*x + c))/(d*x + c)^2 - 2*(b*x*e + a*e)^2*B*a^2*b*d^5*f*e*log((b*x*e + a*e)/(d*
x + c))/(d*x + c)^2 + (b*x*e + a*e)^2*B*b^3*c^3*d^2*g*e*log((b*x*e + a*e)/(d*x + c))/(d*x + c)^2 - (b*x*e + a*
e)^2*B*a*b^2*c^2*d^3*g*e*log((b*x*e + a*e)/(d*x + c))/(d*x + c)^2 - (b*x*e + a*e)^2*B*a^2*b*c*d^4*g*e*log((b*x
*e + a*e)/(d*x + c))/(d*x + c)^2 + (b*x*e + a*e)^2*B*a^3*d^5*g*e*log((b*x*e + a*e)/(d*x + c))/(d*x + c)^2 + 2*
A*b^5*c^2*d*f*e^3 - 4*A*a*b^4*c*d^2*f*e^3 + 2*A*a^2*b^3*d^3*f*e^3 - A*b^5*c^3*g*e^3 - B*b^5*c^3*g*e^3 + A*a*b^
4*c^2*d*g*e^3 + 3*B*a*b^4*c^2*d*g*e^3 + A*a^2*b^3*c*d^2*g*e^3 - 3*B*a^2*b^3*c*d^2*g*e^3 - A*a^3*b^2*d^3*g*e^3
+ B*a^3*b^2*d^3*g*e^3 - 2*(b*x*e + a*e)*A*b^4*c^2*d^2*f*e^2/(d*x + c) + 4*(b*x*e + a*e)*A*a*b^3*c*d^3*f*e^2/(d
*x + c) - 2*(b*x*e + a*e)*A*a^2*b^2*d^4*f*e^2/(d*x + c) + 2*(b*x*e + a*e)*A*b^4*c^3*d*g*e^2/(d*x + c) + (b*x*e
 + a*e)*B*b^4*c^3*d*g*e^2/(d*x + c) - 4*(b*x*e + a*e)*A*a*b^3*c^2*d^2*g*e^2/(d*x + c) - 3*(b*x*e + a*e)*B*a*b^
3*c^2*d^2*g*e^2/(d*x + c) + 2*(b*x*e + a*e)*A*a^2*b^2*c*d^3*g*e^2/(d*x + c) + 3*(b*x*e + a*e)*B*a^2*b^2*c*d^3*
g*e^2/(d*x + c) - (b*x*e + a*e)*B*a^3*b*d^4*g*e^2/(d*x + c))*(b*c/((b*c*e - a*d*e)*(b*c - a*d)) - a*d/((b*c*e
- a*d*e)*(b*c - a*d)))/(b^4*d^2*e^2 - 2*(b*x*e + a*e)*b^3*d^3*e/(d*x + c) + (b*x*e + a*e)^2*b^2*d^4/(d*x + c)^
2)

________________________________________________________________________________________

maple [B]  time = 0.14, size = 1809, normalized size = 16.60 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)*(B*ln((b*x+a)/(d*x+c)*e)+A),x)

[Out]

-1/2*d^2*e^2*B*g*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/b^2/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)^2*a^4/(d*x+c)^2+1/2*B*g
/b^2*ln(-b*e+(b/d*e+(a*d-b*c)/(d*x+c)/d*e)*d)*a^2+e*A/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*f*a+1/2*e^2*A*g/(1/(d*
x+c)*a*d*e-1/(d*x+c)*b*c*e)^2*a^2-B/b*ln(-b*e+(b/d*e+(a*d-b*c)/(d*x+c)/d*e)*d)*f*a-1/2/d^2*B*ln(-b*e+(b/d*e+(a
*d-b*c)/(d*x+c)/d*e)*d)*c^2*g+1/d*B*ln(-b*e+(b/d*e+(a*d-b*c)/(d*x+c)/d*e)*d)*f*c-1/d*e*B*ln(b/d*e+(a*d-b*c)/(d
*x+c)/d*e)/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*f*b*c-3*e^2*B*g*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/(d*x+c)*a*d*e-
1/(d*x+c)*b*c*e)^2*a^2/(d*x+c)^2*c^2+2/d*e*B*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)
*c^2*g/(d*x+c)*a+d*e*B*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/b/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*f/(d*x+c)*a^2-1/2/d
^2*e^2*B*g*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)*b^2/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)^2*c^4/(d*x+c)^2-1/d*e^2*B*g*l
n(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)^2*a*b*c+1/d*e*B*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*
e)/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*f/(d*x+c)*c^2*b-e*B*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/b/(1/(d*x+c)*a*d*e-1/
(d*x+c)*b*c*e)*c*g/(d*x+c)*a^2+1/2/d^2*e^2*B*g*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)*b^2/(1/(d*x+c)*a*d*e-1/(d*x+c)*
b*c*e)^2*c^2+1/d^2*e*B*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*c^2*g*b-1/d^2*e*B*ln(
b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*c^3*g/(d*x+c)*b+e*B*ln(b/d*e+(a*d-b*c)/(d*x+c)/
d*e)/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*f*a+1/2*e^2*B*g*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/(d*x+c)*a*d*e-1/(d*x
+c)*b*c*e)^2*a^2+1/2*e*B*g/b/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*a^2-1/d*e*B*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/
(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*c*g*a-2*e*B*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*f
/(d*x+c)*a*c-1/d*e^2*A*g/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)^2*b*c*a+2*d*e^2*B*g*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)
/b/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)^2*a^3/(d*x+c)^2*c+2/d*e^2*B*g*ln(b/d*e+(a*d-b*c)/(d*x+c)/d*e)/(1/(d*x+c)*
a*d*e-1/(d*x+c)*b*c*e)^2*a/(d*x+c)^2*c^3*b+1/2/d^2*e*B*g/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*c^2*b+1/d^2*e*A/(1/
(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*c^2*g*b-1/d*e*A/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)*c*g*a-1/d*e*A/(1/(d*x+c)*a*d*
e-1/(d*x+c)*b*c*e)*f*b*c+1/2/d^2*e^2*A*g/(1/(d*x+c)*a*d*e-1/(d*x+c)*b*c*e)^2*b^2*c^2-1/d*e*B*g/(1/(d*x+c)*a*d*
e-1/(d*x+c)*b*c*e)*c*a

________________________________________________________________________________________

maxima [A]  time = 0.91, size = 140, normalized size = 1.28 \[ \frac {1}{2} \, A g x^{2} + {\left (x \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right ) + \frac {a \log \left (b x + a\right )}{b} - \frac {c \log \left (d x + c\right )}{d}\right )} B f + \frac {1}{2} \, {\left (x^{2} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right ) - \frac {a^{2} \log \left (b x + a\right )}{b^{2}} + \frac {c^{2} \log \left (d x + c\right )}{d^{2}} - \frac {{\left (b c - a d\right )} x}{b d}\right )} B g + A f x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(A+B*log(e*(b*x+a)/(d*x+c))),x, algorithm="maxima")

[Out]

1/2*A*g*x^2 + (x*log(b*e*x/(d*x + c) + a*e/(d*x + c)) + a*log(b*x + a)/b - c*log(d*x + c)/d)*B*f + 1/2*(x^2*lo
g(b*e*x/(d*x + c) + a*e/(d*x + c)) - a^2*log(b*x + a)/b^2 + c^2*log(d*x + c)/d^2 - (b*c - a*d)*x/(b*d))*B*g +
A*f*x

________________________________________________________________________________________

mupad [B]  time = 4.24, size = 144, normalized size = 1.32 \[ \ln \left (\frac {e\,\left (a+b\,x\right )}{c+d\,x}\right )\,\left (\frac {B\,g\,x^2}{2}+B\,f\,x\right )+x\,\left (\frac {2\,A\,a\,d\,g+2\,A\,b\,c\,g+2\,A\,b\,d\,f+B\,a\,d\,g-B\,b\,c\,g}{2\,b\,d}-\frac {A\,g\,\left (2\,a\,d+2\,b\,c\right )}{2\,b\,d}\right )-\frac {\ln \left (a+b\,x\right )\,\left (B\,a^2\,g-2\,B\,a\,b\,f\right )}{2\,b^2}+\frac {\ln \left (c+d\,x\right )\,\left (B\,c^2\,g-2\,B\,c\,d\,f\right )}{2\,d^2}+\frac {A\,g\,x^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f + g*x)*(A + B*log((e*(a + b*x))/(c + d*x))),x)

[Out]

log((e*(a + b*x))/(c + d*x))*(B*f*x + (B*g*x^2)/2) + x*((2*A*a*d*g + 2*A*b*c*g + 2*A*b*d*f + B*a*d*g - B*b*c*g
)/(2*b*d) - (A*g*(2*a*d + 2*b*c))/(2*b*d)) - (log(a + b*x)*(B*a^2*g - 2*B*a*b*f))/(2*b^2) + (log(c + d*x)*(B*c
^2*g - 2*B*c*d*f))/(2*d^2) + (A*g*x^2)/2

________________________________________________________________________________________

sympy [B]  time = 3.01, size = 318, normalized size = 2.92 \[ \frac {A g x^{2}}{2} - \frac {B a \left (a g - 2 b f\right ) \log {\left (x + \frac {B a^{2} c d g + \frac {B a^{2} d^{2} \left (a g - 2 b f\right )}{b} + B a b c^{2} g - 4 B a b c d f - B a c d \left (a g - 2 b f\right )}{B a^{2} d^{2} g - 2 B a b d^{2} f + B b^{2} c^{2} g - 2 B b^{2} c d f} \right )}}{2 b^{2}} + \frac {B c \left (c g - 2 d f\right ) \log {\left (x + \frac {B a^{2} c d g + B a b c^{2} g - 4 B a b c d f - B a b c \left (c g - 2 d f\right ) + \frac {B b^{2} c^{2} \left (c g - 2 d f\right )}{d}}{B a^{2} d^{2} g - 2 B a b d^{2} f + B b^{2} c^{2} g - 2 B b^{2} c d f} \right )}}{2 d^{2}} + x \left (A f + \frac {B a g}{2 b} - \frac {B c g}{2 d}\right ) + \left (B f x + \frac {B g x^{2}}{2}\right ) \log {\left (\frac {e \left (a + b x\right )}{c + d x} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(A+B*ln(e*(b*x+a)/(d*x+c))),x)

[Out]

A*g*x**2/2 - B*a*(a*g - 2*b*f)*log(x + (B*a**2*c*d*g + B*a**2*d**2*(a*g - 2*b*f)/b + B*a*b*c**2*g - 4*B*a*b*c*
d*f - B*a*c*d*(a*g - 2*b*f))/(B*a**2*d**2*g - 2*B*a*b*d**2*f + B*b**2*c**2*g - 2*B*b**2*c*d*f))/(2*b**2) + B*c
*(c*g - 2*d*f)*log(x + (B*a**2*c*d*g + B*a*b*c**2*g - 4*B*a*b*c*d*f - B*a*b*c*(c*g - 2*d*f) + B*b**2*c**2*(c*g
 - 2*d*f)/d)/(B*a**2*d**2*g - 2*B*a*b*d**2*f + B*b**2*c**2*g - 2*B*b**2*c*d*f))/(2*d**2) + x*(A*f + B*a*g/(2*b
) - B*c*g/(2*d)) + (B*f*x + B*g*x**2/2)*log(e*(a + b*x)/(c + d*x))

________________________________________________________________________________________